package Day1030_2.Day1101;
import javax.management.ObjectName;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.Serializable;

public class s1 {
    public static void main(String[] args) throws IOException {
        ObjectOutputStream oos =new ObjectOutputStream(new FileOutputStream("oo./txt"));//创建对象输出流
        Student zs =new Student();
        zs.name= "张三";
        oos.writeObject(zs);//2、用对象输出流的writeobject方法将学生对象写出问文件

        oos.close();//3、关闭对象输出流objecOutputStream（释放对应的00.txt）




}

    private static class Student {
        public String name;
    }
}
